
#ifndef HTTP_RESPONSE_H_
#define HTTP_RESPONSE_H_

typedef enum HttpStatusCode {

	HttpStatus_UnKnown,
	HttpStatus_200OK					=		200,
	HttpStatus_400BadRequest	=		400,
	HttpStatus_404NotFound		=		404

} HttpStatusCode;

typedef struct HttpResponse {
	HttpStatusCode 	httpStatusCode;
	char*	statusMessage;
	char* 	body;
	int bodyLen;
} HttpResponse;

struct HttpResponse* initHttpResponse();
void destroyHttpResponse(struct HttpResponse* httpResponse);

void setHttpStatusCodeHttpResponse(struct HttpResponse* httpResponse, enum HttpStatusCode statusCode);
void setSatusMessageHttpResponse(struct HttpResponse* httpResponse, const char* buf, int bufLen);
void setBodyHttpResponse(struct HttpResponse* httpResponse, const char* buf, int bufLen);
char* appendToBuffer(struct HttpResponse* httpResponse, int* bufLen);

#endif /* HTTP_RESPONSE_H_ */
